<?php

namespace ctrl;

use model\notices;
use libs\view;

class index extends base
{
	private static $M;
    public static function init()
    {
        parent::init();
        self::$M = new notices;
    }
	public static function index()
	{
		$menu = $_GET['menu']??'';
		switch ($menu) {
			case "menu_index":
				view::display("menu_index");
				break;
			case "menu_system":
				view::display("menu_system");
				break;
			case "menu_content":
				view::display("menu_content");
				break;
			case "menu_extend":
				view::display("menu_extend");
				break;
			case "home":
				view::assign('noticeList', self::$M->selectData(3));
				view::display("home");
				break;
			default:
				view::display();
		}
	}
}
